﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp1
{
    class employee
    {
        //用户的工号、姓名和部门信息；

        public int jobNum;
        public string name;
        public string depm;

        public employee() { }

        public employee(int jobNum, string name, string depm)
        {
            this.jobNum = jobNum;
            this.name = name;
            this.depm = depm;
        }

        public void Info()
        {
            Console.WriteLine("My name is {0},my department is {1},my job number is {2}", this.name, this.depm, this.jobNum);

        }

    }
    //定义图书管理系统中的三个类：用户类、图书类、出版社类，有哪些字段去参考之前文档。
    //各个类中，再写一个打印信息的方法。
    //需要提交类和主类中调用的代码。
    class user
    {
        public string dep;
        public string identity;
        public string account;
        public int password;

        public void Info()
        {
            Console.WriteLine("我的部门是{0}，我的身份是{1}， 我的账号是{2}，我的密码是{3}",
                this.dep, this.identity, this.account, this.password
                );
        }

    }
    class book
    {
        public int isbn;
        public string bookName;
        public double price;
        public string publishing;
        public string author;

        public void Info() 
        {
            Console.WriteLine("我的isbn号为:{0},我的书名为《{1}》，我的价格为:{2}，我的出版社为:{3}，我的作者是{4}",
                this.isbn, this.bookName, this.price, this.publishing, this.author);

        }
    }
    class publishing 
    {
        public string publish;
        public string address;
        public string boos;

        public void Info() 
        {
            Console.WriteLine("出版社名字为：{0}，出版社地址为：{1}，出版社老板为：{2}",
                this.publish, this.address, this.boos);
        }
    }




    class countArea
    {
        //圆面积
        public int r;
        public double S;
        public double pai;
        public double a;
        public double b;
        public countArea(int r)
        {
            pai = 3.1415926;
            S = r * r * pai;

        }

        //长方形面积
        public countArea(double a, double b)
        {
            S = a * b;
        }

        public void Info()
        {
            Console.WriteLine(this.S);
        }




    }
    class SumUtils
    {
        public int a;
        public int b;
        public double c;
        public double d;
        public string e;
        public string f;
        public string result;
        public int num;

        public SumUtils(int a, int b)
        {
            result = a + b+"";
        }
        public SumUtils(double c, double d)
        {
            result = c + d + "";
        }
        public SumUtils(string e, string f)
        {
            result = e + f;
        }
        public SumUtils(int num) 
        {
            int result1 = 0;
            for (int i = 0; i < num; i++)
            {
                result1 +=  (i+1);
            }
            result = result1 + "";
        }

        public void Info()
        {
            Console.WriteLine(result);
        }

    }
}
